package com.vision.shop.dao;

import java.util.List;

import com.vision.shop.model.CartProduct;
import com.vision.shop.model.Orders;
import com.vision.shop.model.Pager;
import com.vision.shop.model.Product;
import com.vision.shop.model.User;

public interface IOrdersDao {
	public void add(Orders orders,User user,int aid,List<CartProduct> cps);
	public void delete(int id);
	public void update(Orders orders);
	public void updatePrice(int id,double price);
	public void updatePayStatus(int id);
	public void updateSendStatus(int id);
	public void updateConfirmStatus(int id);
	public Orders load(int id);
	/**
	 * 查看订单，根据用户和订单状态查看
	 */
	public Pager<Orders> findByUser(int userId,int status);
	public Pager<Orders> findByStatus(int status);
	/**
	 * 处理CartProduct的Dao
	 * @param cp
	 * @param oid
	 */
	public void addCartProduct(CartProduct cp,Orders o,Product p);
	public void deleteCartProduct(int oid);
}
